const express = require("express");
const goods = express.Router();
// 获取所有商品
goods.get("/getAll", require("./goods/goods-getAll"));
// 通过分类获取商品
goods.post("/getBySort", require("./goods/goods-getBySort"));
// 获取对应用户的所有商品
goods.get("/getMyAll", require("./goods/goods-getMyAll"));
// 添加商品
goods.post("/add", require("./goods/goods-add"));
// 修改商品
goods.post("/edit", require("./goods/goods-edit"));
// 移除商品
goods.post("/remove", require("./goods/goods-remove"));
// 添加商品留言
goods.post("/addGoodsComment", require("./goods/goods-addComment"));
// 获取商品留言
goods.post("/getGoodsComment", require("./goods/goods-getComment"));
// 移除商品留言
goods.post("/removeComment", require("./goods/goods-removeComment"));
module.exports = goods;